home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / slix0987.zip / GMUTILS.ZIP / FILEUTIL.DOC < prev    next >
Text File  |  1995-06-22  |  3KB  |  71 lines

  1.                            FILECROP - File Cropper
  2.                            FILEFLIP - File Flipper
  3.  
  4.                                 Documentation
  5.                               by Petri Hassinen
  6.  
  7.                             Contact via Internet:
  8.                             phassine@alpha.hut.fi
  9.  
  10.  
  11. PURPOSE
  12.          FILECROP is a utility for truncating a source file by a specified
  13.          amount of bytes. FILEFLIP can be used to flip a file "upside down".
  14.  
  15.  
  16. OPERATION
  17.          FILECROP reads binary file and at the same time writes the target
  18.          file to the disk. In this way, FILECROP (and FILEFLIP) can deal with
  19.          files of any sizes. 
  20.  
  21.          A starting and ending addresses can be specified for FILECROP. You
  22.          can thus "extract" a given part of the source file into your new
  23.          file. 
  24.  
  25.  
  26.          FILEFLIP is a very simple utility. All it needs to know is the
  27.          source file and the optional target file.
  28.  
  29.          Note! Due to the way the files are processed the source and target
  30.          files cannot have the same names (unlike PPFIX and BOXCRS).
  31.  
  32.          For more information, type "FILECROP /?" or "FILEFLIP /?" at the DOS
  33.          prompt.
  34.  
  35.  
  36. EXAMPLES
  37.          FILECROP
  38.          Suppose that you have a raw picture, which only contains a certain
  39.          section of graphics that you want to use later in your program. You
  40.          can use FILECROP to cut the interesting part (like in CRSPR.BAT).
  41.          So, this is what you do:
  42.  
  43.          Original picture file: MYPIC.RAW
  44.          Size of the original picture is 320x200 and the starting coordinates
  45.          of the interesting part are (100, 50) and (150, 150). Before you can
  46.          use FILECROP you must convert the coordinates into memory addresses.
  47.          (100, 50) equals to 50*320+100=16100 and (150, 150) to
  48.          150*320+150=48150. Then, write:
  49.          FILECROP mypic.raw goodpart.raw /16100 /48150
  50.  
  51.          Note! Similar method to this is used in CRSPR.BAT.
  52.  
  53.  
  54.          FILEFLIP
  55.          If you want to flip a file or flip the newly created GOODPART.RAW
  56.          vertically and horizontally (i.e. rotating 180 degrees), you can use
  57.          FILEFLIP to do the job. Just write:
  58.          FILEFLIP goodpart.raw
  59.          --> goodpart.flp is created and that's it!
  60.  
  61.  
  62. IN CONCLUSION                                              
  63.          FILEFLIP may seem a bit of a "character" among the other utilities.
  64.          I must admit that it really is more of a curiosity than a really
  65.          useful tool. Besides that, it's extremely s l o w. Despite, I hope
  66.          you can think of some tasks in which it could be used.
  67.  
  68.          Possible future improvements on FILECROP can be found in
  69.          IMPROVE.TXT.
  70.  
  71. EOF